<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePoints extends Migration{
    /**
     * Run the 积分刷新表.
     *
     * @return void
     */
    public function up(){
        Schema::create('points', function(Blueprint $table){
            $table->engine = 'MyISAM';
            $table->comment = '自动积分刷新表';
            $table->increments('id')->unsigned()->comment('自动增长主键');
            $table->integer('com_uid')->index('com_uid')->unsigned()->comment('所属用户ID');
            $table->timestamp('uptime')->nullable()->comment('设置刷新时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down(){
        Schema::drop('points');
    }
}
